add_library(
  STM32H5_HAL
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_usart.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_i3c.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_cryp_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_i2c.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_dac_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_i2s.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_fmac.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_pcd.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_sd_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_wwdg.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_otfdec.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_cec.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_eth.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_adc_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_exti.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_pcd_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_sdmmc.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_usart_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_lptim.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_hash.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_opamp.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_usart.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_tim.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_rng_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_dma.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_timebase_rtc_alarm_template.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_tim_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_usb.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_spi.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_pwr.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_sram.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_smbus_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_utils.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_cortex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_nor.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_timebase_rtc_wakeup_template.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_pwr.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_fdcan.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_gpio.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_dac.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_dma_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_dcache.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_fmc.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_lpuart.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_tim.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_sd.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_i2c_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_irda.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_smartcard_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_rcc.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_smartcard.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_dcmi.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_gpio.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_crc.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_rcc.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_rng.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_spi_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_pka.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_cordic.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_lptim.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_icache.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_uart.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_rtc.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_i2c.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_adc.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_xspi.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_cordic.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_mmc_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_sai_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_crs.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_gtzc.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_mmc.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_sdram.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_dma.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_sai.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_hcd.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_opamp_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_rcc_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_crc.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_fmac.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_pwr_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_rtc_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_rng.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_dac.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_flash_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_exti.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_dlyb.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_pssi.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_opamp.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_dts.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_ucpd.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_flash.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_icache.c
    stm32h5xx_hal_driver/Src/stm32h5xx_util_i3c.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_eth_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_uart_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_cryp.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_pka.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_comp.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_adc.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_msp_template.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_i2s_ex.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_rtc.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_nand.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_ramcfg.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_smbus.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_timebase_tim_template.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_spi.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_i3c.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_iwdg.c
    stm32h5xx_hal_driver/Src/stm32h5xx_ll_comp.c
    stm32h5xx_hal_driver/Src/stm32h5xx_hal_crc_ex.c
  )

target_include_directories(STM32H5_HAL PUBLIC stm32h5xx_hal_driver/Inc)
target_link_libraries(STM32H5_HAL PUBLIC STM32H5xx::CMSIS STM32H5_HAL_Config)
add_library(STM32H5::HAL ALIAS STM32H5_HAL)
